package visiopuce.objets;

public class Champ implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -722228249061987206L;
	private Integer idChamp;
	private String valeur;
	private String type;
	private String idObjet;
	public Champ() {
		super();
	}
	
	
	public Champ(String valeur, String type, String idObjet) {
		super();
		this.valeur = valeur.trim();
		this.type = type;
		this.idObjet = idObjet;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Champ other = (Champ) obj;
		if (idChamp == null) {
			if (other.idChamp != null)
				return false;
		} else if (!idChamp.equals(other.idChamp))
			return false;
		return true;
	}

	public Integer getIdChamp() {
		return idChamp;
	}
	public String getIdObjet() {
		return idObjet;
	}
	public String getType() {
		return type;
	}
	public String getValeur() {
		return valeur;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((idChamp == null) ? 0 : idChamp.hashCode());
		return result;
	}
	public void setIdChamp(Integer idChamp) {
		this.idChamp = idChamp;
	}
	public void setIdObjet(String idObjet) {
		this.idObjet = idObjet;
	}
	public void setType(String type) {
		this.type = type;
	}
	public void setValeur(String valeur) {
		this.valeur = valeur;
	}
	@Override
	public String toString() {
		return "Champ [idChamp=" + idChamp + ", valeur=" + valeur + ", type=" + type + ", idObjet=" + idObjet + "]";
	}

	
}
